package com.gitee.deament.server.core.data.storage.impl;

import com.gitee.deament.server.core.data.storage.SystemInfoStorage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

public class SystemInfoMemoryStorage implements SystemInfoStorage {
Logger logger = LoggerFactory.getLogger(this.getClass());

    AtomicInteger countOnlineClient=new AtomicInteger(0);
    @Override
    public List<String> getAuthChannel() {
        return null;
    }

    @Override
    public Integer onLineClient() {
        return null;
    }

    @Override
    public void IncreaseClientNum() {
        int incrementAndGet = countOnlineClient.incrementAndGet();
        logger.debug("客户端连接数："+incrementAndGet);
    }

    @Override
    public void decreaseClientNum() {
        int incrementAndGet =  countOnlineClient.decrementAndGet();
        logger.debug("客户端连接数："+incrementAndGet);
    }
}
